import request from "../utils/request";
//AI生成试卷接口
export const aiCreateQuestionTeacherService = (uid, form) => {
    return request.post("/teacher/create/ai", {
        test: {
            tname: form.name,
            subject: form.subject,
            cnum: form.singleChoice,
            fnum: form.gapFilling,
            snum: form.freeResponse,
            kpoint: form.knowledgePoint,
        },
        user: { uid },
    });
};
//返回的试卷列表
export const teacherTestListService = (uid) => {
    return request.post("/teacher/test/list/teacher", { uid });
};
//查看教师试题问题接口
export const checkTeacherQuestionService = (uid, tid) => {
    return request.post("/teacher/question/all/teacher", { user: { uid }, test: { tid } });
};
//删除试题接口
export const deleteTeacherTestService = (tid, uid) => {
    return request.post("/teacher/test/delete", { tid, uid });
};
//人工组卷接口
export const teacherCreateHumanService = (uid, form, questionMap) => {
    return request.post("/teacher/create/human", {
        test: {
            tid: form.tid,
            subject: form.subject,
        },
        user: { uid },
        questionMap,
    });
};
//保存试卷接口
export const preserveQuestionService = (questionList) => {
    return request.post("/teacher/do/homework", questionList);
};
//创建班级接口
export const createClassService = (cname, teaid, exist) => {
    return request.post("/teacher/create/class", { cname, teaid, exist });
};
//获得班级列表接口
export const getClassListService = (cid, teaid, exist) => {
    return request.post("/teacher/list/class", { cid, teaid, exist });
};
//解散班级接口
export const cancelClassService = (cid, teaid, exist) => {
    return request.post("/teacher/cancel/class", { cid, teaid, exist });
};
//获取学生的试题列表接口
export const studentQuestionListService = (uid,subject,uname,cid) => {
    return request.post("/teacher/test/list", { uid, subject, uname, cid});
};
//提交试卷批改接口
export const correctingQuestionService = (questionList) => {
    return request.post("/teacher/correcting/ai", questionList);
};
//重置试卷接口
export const resetQuestionService = (tid, uid) => {
    return request.post("/teacher/question/reset", {
        tid,
        uid,
    });
};
//下发试卷接口
export const postQuestionService = (tid, uid, cid) => {
    return request.post("/teacher/set/test", {
        tid,
        uid,
        cid
    });
};
//生成单一学科做题情况分析接口
export const createAnalysisService = (teaid, subject, cid) => {
    return request.post("/teacher/create/analysis", { teaid, subject, cid });
};
//获取班级的分析列表接口
export const classAnalysisListService = (teaid,subject,cid) => {
    return request.post("/teacher/analysis/list", { teaid, subject, cid});
};
//删除分析的接口
export const deleteAnalysisService = (aid) => {
    return request.post("/teacher/delete/content", {aid });
};
//获取指定分析的内容接口
export const getAnalysisService = (aid) => {
    return request.post("/teacher/get/content", { aid });
};
//获取学生的错题列表接口
export const faultQuestionListService = (uid,subject,knpoint,cid) => {
    return request.post("/teacher/fault/list", { uid, subject, knpoint, cid});
};
